# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-cucumber-tag-expressions
pkgver=5.0.1
pkgrel=0
pkgdesc="Cucumber tag expression parser"
url="https://github.com/cucumber/tag-expressions"
arch="noarch"
license="MIT"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest
	py3-pytest-html
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/cucumber/tag-expressions/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/tag-expressions-$pkgver/python"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
92d97b8d4b89657ec5d6517c2a34b5332507dacce6d7cf54579aaea672e9110c1cf7e6509811cbbeeccf59e1ff7fbdc2f8713ee93a4f77eff5d1f13c6043560d  py3-cucumber-tag-expressions-5.0.1.tar.gz
"
